package com.itheima.exception;

import lombok.Data;
import org.apache.dubbo.rpc.RpcException;

/**
 * 用户操作异常
 */
@Data
public class UserException extends RpcException {

    private static final long serialVersionUID = 1L;

    private Integer httpCode;  //错误码


    public UserException() {
    }

    public UserException(Integer code) {
        this.httpCode = code;
    }

    public UserException(String message) {
        super(message);
    }

    public UserException(Integer code, String message) {
        super(message);
        this.httpCode = code;
    }

    public UserException(String message, Throwable cause, Integer code) {
        super(message, cause);
        this.httpCode = code;
    }


    public Integer getHttpCode() {
        return httpCode;
    }

    public void setHttpCode(Integer httpCode) {
        this.httpCode = httpCode;
    }
}
